On-ramp to a supported token and swap to your own custom token.
Connect with Web SDK
On ramp to a supported token
Update state after on-ramp is successful
onOrderSuccessful
callback to update the state of the app.Swap to a custom token with Smart Swaps
useSwapModal
hook to swap the purchased token to your own custom token.It will take a few minutes (1-3 minutes) for the on-ramped token to be available in the smart wallet so make sure to check the balance before opening the swap modal.
If you have enough balance of a supported payment token, the modal will display it as a payment option, you don’t need to specify a payment token.